#pragma once

#include <cuda.h>
#include <cuda_runtime.h>

#include <cstdint>

enum class Layout : int32_t { NHWC = 0, NCHW32, CONCAT_NHWC, CONCAT_NCHW32 };

template <typename Element, Layout SourceLayout, int AccessSize>
int msda(cudaStream_t stream, void *data_output,
         const void **data_multiscale_value, const void *data_sampling_offsets,
         const void *data_attn_weight, const int2 *multiscale_spatial_shapes,
         const int BatchSize, const int NumQueries, const int NumHeads,
         const int NumScales, const int NumPointsPerScale,
         const int NumChannelsPerHead, const float *multiscale_qscale_value,
         const float qscale_offset, const float qscale_weight,
         const float qscale_out);
